﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace IPMS.Library
{
    public class DataPassHelper
    {
        public object this[string index]
        {
            get
            {
                return HttpContext.Current.Session[index];
            }
            set
            {
                HttpContext.Current.Session[index] = value;
            }
        }
        public static void DeleteData(string name)
        {
            HttpContext.Current.Session.Remove(name);
        }
        public static void AddTempData(string name, object dataObject)
        {
            HttpContext.Current.Session[name] = dataObject;
        }
    
        public static object GetTempData(string name)
        {
            return HttpContext.Current.Session[name];
        }
    }
}